﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using Honestysoft.BaseObject;
using Honestysoft.Financing.Model;
using Honestysoft.Baseframework.WebUI;

namespace Honestysoft.Financing.WebUI.Module.Reports
{
    public partial class ZJZFSQQKHZB : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //dtpReportDate.Text = DateTime.Today.ToString("yyyy-MM-dd");
                //panel.DefaultButton = btnQuery.ID;      
                DataTable dt = new Honestysoft.Financing.BusinessLogic.Audit(Globals.CurrentConnStringName).GetBatchReportDate();
                string script = "var rptItem;";
                foreach (DataRow dr in dt.Rows)
                {
                    script += "rptItem=new BatchReportDate();rptItem.BatchNo='" + dr["BatchNo"].ToString() + "';rptItem.DateStr='" + (dr.IsNull("PrintDate") || dr["PrintDate"] == null ? "" : Convert.ToDateTime(dr["PrintDate"]).ToString("yyyy-MM-dd")) + "';BatchRptDates.push(rptItem);";
                }
                ClientScript.RegisterStartupScript(typeof(string), "initDate", script, true);
            }
        }
    }
}